package com.study.liuxy.springboot3.controller;

import com.study.liuxy.springboot3.bean.base.BaseRes;
import com.study.liuxy.springboot3.dao.OperateLogRepository;
import com.study.liuxy.springboot3.entity.OperateLog;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/operate-log")
public class OperateLogController {
    @Autowired
    private OperateLogRepository operateLogRepository;

    @GetMapping("/query-all")
    public BaseRes<List<OperateLog>> queryAll() {
        return BaseRes.success(operateLogRepository.findAll());
    }

}
